package com.itheima.article.feign;

import com.itheima.article.pojo.ApAuthor;
import com.itheima.common.pojo.Result;
import com.itheima.core.feign.CoreFeign;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @Author：shenkunlin
 * @date： 2021/8/20 11:58
 * @Description：
 *  远程调用的OpenFeign接口
 ***/
@FeignClient(value = "leadnews-article",path = "/apAuthor")
public interface AuthorFeign extends CoreFeign<ApAuthor> {

    /***
     * 根据userid获取作者信息
     */
    @GetMapping(value = "/user/{userid}")
    Result<ApAuthor> getByUserId(@PathVariable(value = "userid")Integer id);
}
